#include "date.h"
#include "ui_date.h"
#include <QDateTime>
#include <QDebug>

Date::Date(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Date)
{
    ui->setupUi(this);
}

Date::~Date()
{
    delete ui;
}

void Date::on_btnAdd_clicked()
{


}

void Date::on_btnGetTime_clicked()
{
//    QDateTime d = QDateTime::currentDateTime();
//    QString year = d.toString("yyyy-MM-dd hh:mm:ss ddd");


//    QModelIndex in = ui->tableWidget->rootIndex();

//    int row = ui->tableWidget->rowCount();
//    qDebug() << row;
//    ui->tableWidget->insertRow(row + 1);

//    QString y = year.remove(0, 4);
//    QTableWidgetItem *item1 = new QTableWidgetItem(y);
//    ui->tableWidget->setItem(row +1 , 1, item1);

//    QString m = year.remove(0, 1);
//     m = year.remove(0, 2);
//    QTableWidgetItem *item2 = new QTableWidgetItem(m);
//    ui->tableWidget->setItem(row +1 , 2, item2);
//    qDebug() << y << m;

}
